function Util(){
	this.getMetaContent=function(metaName){
		if(! metaName) return "";
		var metaList=document.getElementsByTagName("meta");
		if(! metaList) return "";
		var name,content;
		for(var i=0;i<metaList.length;i++){
			name=metaList[i].getAttribute("name");
			content=metaList[i].getAttribute("content");
			if(name==metaName) return content;
 		}
		return "";
	}

	this.splitCookie=function(){
		try{
			var ck=document.cookie.split("; ");
			var arr=new Array();
			for(var i in ck){
				var pos=ck[i].indexOf("=");
				var key=ck[i].substring(0,pos);
				var value=ck[i].substring(pos+1);
				arr[key]=decodeURIComponent(value);
			}
			return arr;
		}catch(err){
			alert(err.message);
		}
	}

	this.getCookie=function(name){
		try{
			var arr=this.splitCookie();
			if(! arr[name]) return "";
			return arr[name];
		}catch(err){
			alert(err.message);
		}
	}

	this.deleteCookie=function(name){
		document.cookie=name+"=;path=/;domain=.real.com;expires=Mon, 9 Jun 1980 23:59:59 GMT;";
	}

	this.setCookie=function(name,value,expiresTime){
		if(! expiresTime) expiresTime="Tue, 9 Jun 2099 23:59:59 GMT";
		document.cookie=name+"="+encodeURIComponent(value)+";path=/;domain=.real.com;expires="+expiresTime+";";
	}

	this.setCookieWithExpiresInDay=function(name,value,day){
		var expiresTime = "";
		if(!day){
			expiresTime="Tue, 9 Jun 2099 23:59:59 GMT";	
		}else{
			var dtNow=new Date();
			var dtWithExpires=new Date(dtNow.getTime()+day*24*60*60*1000);
			expiresTime = dtWithExpires.toUTCString();
		}	
		this.setCookie(name,value,expiresTime);
	}

	this.setTemporaryCookie=function(name,value){
		document.cookie=name+"="+encodeURIComponent(value)+";path=/;domain=.real.com;";
	}

	this.cleanCookie=function(){
		try{
			var arr=this.splitCookie();
			for(var key in arr) this.deleteCookie(key);
			return 1;
		}catch(err){
			alert(err.message);
		}
	}
}